class Notify {
  success(message, th,func=()=>{}) {
    th.$notify({
      title: th.$t('success'),
      message: message,
      type: 'success',
      duration: 2000,
      onClose:func
    })
  }

  createSuccess(th) {
    this.success(th.$t('createSuccess'), th)
  }

  createSuccessNew(th,callback) {
    this.success(th.$t('createSuccess'),th,callback)
  }

  editSuccessNew(th,callback) {
    this.success(th.$t('editSuccess'),th,callback)
  }

  editSuccess(th) {
    this.success(th.$t('editSuccess'), th)
  }

  deleteSuccess(th) {
    this.success(th.$t('deleteSuccess'), th)
  }
}

export default new Notify
